package org.grayrabbit.cms.plugin;

import org.grayrabbit.cms.plugin.util.JavaVersionUtils;

public class PluginInformation {
	private String description;
	private String descriptionKey;
	private String version;
	private String vendorName;
	private String vendorUrl;
	private float maxVersion;
	private float minVersion;
	private Float minJavaVersion;
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getDescriptionKey() {
		return descriptionKey;
	}
	public void setDescriptionKey(String descriptionKey) {
		this.descriptionKey = descriptionKey;
	}
	public String getVersion() {
		return version;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	public String getVendorName() {
		return vendorName;
	}
	public void setVendorName(String vendorName) {
		this.vendorName = vendorName;
	}
	public String getVendorUrl() {
		return vendorUrl;
	}
	public void setVendorUrl(String vendorUrl) {
		this.vendorUrl = vendorUrl;
	}
	public float getMaxVersion() {
		return maxVersion;
	}
	public void setMaxVersion(float maxVersion) {
		this.maxVersion = maxVersion;
	}
	public float getMinVersion() {
		return minVersion;
	}
	public void setMinVersion(float minVersion) {
		this.minVersion = minVersion;
	}
	public Float getMinJavaVersion() {
		return minJavaVersion;
	}
	public void setMinJavaVersion(Float minJavaVersion) {
		this.minJavaVersion = minJavaVersion;
	}
	public boolean satisfiesMinJavaVersion() {
		if (this.minJavaVersion != null)
	    {
	      return JavaVersionUtils.satisfiesMinVersion(this.minJavaVersion.floatValue());
	    }
	    return true;
	}
}
